import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      children: [
        {
          path: '/user',
          name: 'user',
          component: () => import('../views/User.vue')
        },
        {
          path: '/ownerInformation',
          name: 'ownerInformation',
          component: () => import('../views/OwnerInformation.vue')
        },
        {
          path: '/role',
          name: 'role',
          component: () => import('../views/Role.vue')
        },
        {
          path: '/ownerName',
          name: 'ownerName',
          component: () => import('../views/OwnerName.vue')
        },
        {
          path: '/blackAndWhiteList',
          name: 'blackAndWhiteList',
          component: () => import('../views/BlackAndWhiteList.vue')
        },
        {
          path: '/blackAndWhiteListForm',
          name: 'blackAndWhiteListForm',
          component: () => import('../views/BlackAndWhiteListForm.vue')
        },
        {
          path: '/inspection',
          name: 'inspection',
          component: () => import('../views/Inspection.vue')
        },
        {
          path: '/inspectionForm',
          name: 'inspectionForm',
          component: () => import('../views/InspectionForm.vue')
        },
        {
          path: '/deviceAccessControl',
          name: 'deviceAccessControl',
          component: () => import('../views/DeviceAccessControl.vue')
        },
        {
          path: '/deviceAccessControlForm',
          name: 'deviceAccessControlForm',
          component: () => import('../views/DeviceAccessControlForm.vue')
        },
        {
          path: '/deviceDateSynchronizationForm',
          name: 'deviceDateSynchronizationForm',
          component: () => import('../views/DeviceDateSynchronizationForm.vue')
        },
        {
          path: '/deviceDateSynchronization',
          name: 'deviceDateSynchronization',
          component: () => import('../views/DeviceDateSynchronization.vue')
        },
        {
          path: '/keyApplication',
          name: 'keyApplication',
          component: () => import('../views/KeyApplication.vue')
        },
        {
          path: '/keyReview',
          name: 'keyReview',
          component: () => import('../views/KeyReview.vue')
        },
        {
          path: '/openingRecord',
          name: 'openingRecord',
          component: () => import('../views/OpeningRecord.vue')
        },
        {
          path: '/visitorPhoto',
          name: 'visitorPhoto',
          component: () => import('../views/VisitorPhoto.vue')
        },
        {
          path: 'parking',
          name: 'parking',
          component: () => import('../views/Parking.vue')
        },
        {
          path: 'parkingForm',
          name: 'parkingForm',
          component: () => import('../views/ParkingForm.vue')
        },
        {
          path: 'ownerVehicle',
          name: 'ownerVehicle',
          component: () => import('../views/OwnerVehicle.vue')
        },
        {
          path: 'ownerVehicleForm',
          name: 'ownerVehicleForm',
          component: () => import('../views/OwnerVehicleForm.vue')
        },
        {
          path: 'placeInfo',
          name: 'placeInfo',
          component: () => import('../views/PlaceInfo.vue')
        },
        {
          path: 'placeInfoForm',
          name: 'placeInfoForm',
          component: () => import('../views/PlaceInfoForm.vue')
        },
        {
          path: 'entryRecord',
          name: 'entryRecord',
          component: () => import('../views/EntryRecord.vue')
        },
        {
          path: 'dashboard',
          name: 'dashboard',
          component: () => import('../views/Dashboard.vue')
        },
        {
          path: '/build',
          name: 'build',
          component: () => import('../views/BuildInformation.vue')
        },
        {
          path: '/unit',
          name: 'unit',
          component: () => import('../views/Unit.vue')
        },
        {
          path: '/house',
          name: 'house',
          component: () => import('../views/House.vue')
        },
        {
          path: '/advertisement',
          name: 'advertisement',
          component: () => import('../views/Advertisement.vue')
        },
        {
          path: '/advertisementForm',
          name: 'advertisementForm',
          component: () => import('../views/AdvertisementForm.vue')
        },
        {
          path: '/phoneComplaint',
          name: 'phoneComplaint',
          component: () => import('../views/PhoneComplaint.vue')
        },
        {
          path: '/phoneComplaintForm',
          name: 'phoneComplaintForm',
          component: () => import('../views/PhoneComplaintForm.vue')
        },
        {
          path: '/notice',
          name: 'notice',
          component: () => import('../views/Notice.vue')
        },
        {
          path: '/noticeForm',
          name: 'noticeForm',
          component: () => import('../views/NoticeForm.vue')
        },
        {
          path: '/publishInformation',
          name: 'publishInformation',
          component: () => import('../views/PublishInformation.vue')
        },
        {
          path: '/publishInformationForm',
          name: 'publishInformationForm',
          component: () => import('../views/PublishInformationForm.vue')
        },
        {
          path: '/visitor',
          name: 'visitor',
          component: () => import('../views/Visitor.vue')
        },
        {
          path: '/visitorForm',
          name: 'visitorForm',
          component: () => import('../views/VisitorForm.vue')
        }
      ]
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/userForm',
      name: 'userForm',
      component: () => import('../views/UserForm.vue')
    },
    {
      path: '/ownerInformationForm',
      name: 'ownerInformationForm',
      component: () => import('../views/OwnerInformationForm.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/Login.vue')
    },
    {
      path: '/buildingInformationForm',
      name: 'buildingInformationForm',
      component: () => import('../views/buildingInformationForm.vue')
    },
    {
      path: '/UnitForm',
      name: 'UnitForm',
      component: () => import('../views/UnitForm.vue')
    },
    {
      path: '/HouseForm',
      name: 'HouseForm',
      component: () => import('../views/HouseForm.vue')
    }
  ]
})

export default router
